﻿using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;

namespace Language.Syntax.Colouring.Classification
{
    public static class Name
    {
        internal const string Comment = "Red.Scripts.Comment.Classification";
        internal const string Keyword = "Red.Scripts.Keyword.Classification";
        internal const string Integral = "Red.Scripts.Integral.Classification";

        internal const string ActionGotoDef = "Red.Scripts.Action.GotoDef.Classification";
        internal const string DynamicHighlightWord = "Red.Scripts.Dynamic.HighlightWord.Classification";

        internal const string LiteralInteger = "Red.Scripts.Literal.Integer.Classification";
        internal const string LiteralFloat = "Red.Scripts.Literal.Float.Classification";
        internal const string LiteralString = "Red.Scripts.Literal.String.Classification";
        internal const string LiteralName = "Red.Scripts.Literal.Name.Classification";

        internal const string Native = "Red.Scripts.Native.Classification";

        internal const string Class = "Red.Scripts.Class.Classification";
        internal const string NativeClass = "Red.Scripts.Class.Native.Classification";

        internal const string Function = "Red.Scripts.Function.Classification";
        internal const string FunctionCall = "Red.Scripts.Call.Function.Classification";
        internal const string MethodCall = "Red.Scripts.Call.Method.Classification";
        internal const string NativeFunctionCall = "Red.Scripts.Call.Function.Native.Classification";
        internal const string NativeMethodCall = "Red.Scripts.Call.Method.Native.Classification";

        internal const string Identifier = "Red.Scripts.Identifier.Classification";

        internal const string Local = "Red.Scripts.Identifier.Local.Classification";
        internal const string Parameter = "Red.Scripts.Identifier.Parameter.Classification";
        internal const string Member = "Red.Scripts.Identifier.Member.Classification";

        internal const string Enum = "Red.Scripts.Enum.Classification";
        internal const string EnumOption = "Red.Scripts.Enum.Option.Classification";
        internal const string NativeEnum = "Red.Scripts.Enum.Native.Classification";
        internal const string NativeEnumOption = "Red.Scripts.Enum.Option.Native.Classification";
    }

    public static class Definition
    {
        [Export]
        [Name( Name.Comment )]
        [BaseDefinition( "comment" )]
        internal static ClassificationTypeDefinition Comment = null;

        [Export]
        [Name( Name.LiteralInteger )]
        [BaseDefinition( "numerical" )]
        internal static ClassificationTypeDefinition LiteralInteger = null;

        [Export]
        [Name( Name.LiteralFloat )]
        [BaseDefinition( "numerical" )]
        internal static ClassificationTypeDefinition LiteralFloat = null;

        [Export]
        [Name( Name.LiteralString )]
        [BaseDefinition( "string" )]
        internal static ClassificationTypeDefinition LiteralString = null;

        [Export]
        [Name( Name.LiteralName )]
        [BaseDefinition( "string" )]
        internal static ClassificationTypeDefinition LiteralName = null;

        [Export]
        [Name( Name.Keyword )]
        [BaseDefinition( "keyword" )]
        internal static ClassificationTypeDefinition Keyword = null;

        [Export]
        [Name( Name.Integral )]
        [BaseDefinition( Name.Keyword )]
        internal static ClassificationTypeDefinition Integral = null;

        [Export]
        [Name( Name.ActionGotoDef )]
        [BaseDefinition( "text" )]
        internal static ClassificationTypeDefinition ActionGotoDef = null;

        [Export]
        [Name( Name.Class )]
        [BaseDefinition( "text" )]
        internal static ClassificationTypeDefinition Class = null;

        [Export]
        [Name( Name.NativeClass )]
        [BaseDefinition( Name.Class )]
        [BaseDefinition( Name.Native )]
        internal static ClassificationTypeDefinition NativeClass = null;

        [Export]
        [Name( Name.Function )]
        [BaseDefinition( "text" )]
        internal static ClassificationTypeDefinition Function = null;

        [Export]
        [Name( Name.FunctionCall )]
        [BaseDefinition( Name.Function )]
        internal static ClassificationTypeDefinition FunctionCall = null;

        [Export]
        [Name( Name.MethodCall )]
        [BaseDefinition( Name.Function )]
        internal static ClassificationTypeDefinition MethodCall = null;

        [Export]
        [Name( Name.NativeFunctionCall )]
        [BaseDefinition( Name.FunctionCall )]
        [BaseDefinition( Name.Native )]
        internal static ClassificationTypeDefinition NativeFunctionCall = null;

        [Export]
        [Name( Name.NativeMethodCall )]
        [BaseDefinition( Name.MethodCall )]
        [BaseDefinition( Name.Native )]
        internal static ClassificationTypeDefinition NativeMethodCall = null;

        [Export]
        [Name( Name.Identifier )]
        [BaseDefinition( "text" )]
        internal static ClassificationTypeDefinition Identifier = null;

        [Export]
        [Name( Name.Local )]
        [BaseDefinition( Name.Identifier )]
        internal static ClassificationTypeDefinition Local = null;

        [Export]
        [Name( Name.Parameter )]
        [BaseDefinition( Name.Identifier )]
        internal static ClassificationTypeDefinition Parameter = null;

        [Export]
        [Name( Name.Member )]
        [BaseDefinition( Name.Identifier )]
        internal static ClassificationTypeDefinition Member = null;

        [Export]
        [Name( Name.Enum )]
        [BaseDefinition( "text" )]
        internal static ClassificationTypeDefinition Enum = null;

        [Export]
        [Name( Name.EnumOption )]
        [BaseDefinition( "text" )]
        internal static ClassificationTypeDefinition EnumOption = null;

        [Export]
        [Name( Name.NativeEnum )]
        [BaseDefinition( Name.Enum )]
        [BaseDefinition( Name.Native )]
        internal static ClassificationTypeDefinition NativeEnum = null;

        [Export]
        [Name( Name.NativeEnumOption )]
        [BaseDefinition( Name.EnumOption )]
        [BaseDefinition( Name.Native )]
        internal static ClassificationTypeDefinition NativeEnumOption = null;
    }
}
